using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class SubcategoryServiceUtil
    {
	
		static internal ISubcategoryService CreateSubcategoryService()
        {
            ISubcategoryService target = IoCFactory.Resolve<ISubcategoryService>();
            return target;
        }
				#region Subcategory Test
 
        

		public static Subcategory CreateSubcategory()
        {
            Subcategory result = GetSubcategory();
            ISubcategoryService service = CreateSubcategoryService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static Subcategory CreateSubcategoryFull()
        {
            Subcategory result = GetSubcategoryFull();
            ISubcategoryService service = CreateSubcategoryService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static Subcategory GetSubcategory()
        {
            Subcategory result = new Subcategory();
			
            result.Name = Guid.NewGuid().ToString();

            result.Description = Guid.NewGuid().ToString();

        	result.Category = CategoryServiceUtil.CreateCategory(); 
 
            return result;
            
        }
		
        public static Subcategory GetSubcategoryFull()
        {
            Subcategory result = GetSubcategory();
             
            return result;
            
        }
		
		#endregion Subcategory Test
	

	}
}
